<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //创建字符串对象
    var str=new String("你好");
    var str='你好';
    //length
    console.log(str.length);
    //charAt
    console.log(str.charAt(2));
    //indexOf
    console.log(str.indexOf("你"));
    //trim修建开头结尾空格
    //substring(start,end),跟java一样含头不含尾;

</script>
</html>